import Mock from 'mockjs' 

 
export default [
  {
    url: '/project/system/sys_menu/list',
    type: 'get',
    response: config => { 
      return {
        code: 20000,
        data: { 
          items: [
            {
              id: 1,
              menu_name: '系统管理',
              link_url: '/system/index',
              sort: 0,
              level: 0,
              pid: 0,
              pname: '',
              children: [{
                  id: 11,
                  menu_name: '部门管理',
                  link_url: '/views/project/system/sys_dept/index',
                  sort: 0,
                  level: 1,
                  pid: 1,
                  pname: '系统管理'
                }, {
                  id: 12,
                  menu_name: '角色管理',
                  link_url: '/views/project/system/sys_role/index',
                  sort: 0,
                  level: 1,
                  pid: 1,
                  pname: '系统管理'
              }]
            },{
              id: 2,
              menu_name: '用户管理',
              link_url: '/user/index',
              sort: 0,
              level: 0,
              pid: 0,
              pname: '',
            }
          ]
        }
      }
    }
  },

  {
    url: '/project/system/sys_menu/detail',
    type: 'get',
    response: config => {
      return {
        id: 12,
        menu_name: '角色管理',
        link_url: '@/views/project/system/sys_role/index',
        sort: 0,
        level: 1,
        pid: 1,
        pname: '系统管理'
      }
    }
  }, 

  {
    url: '/project/system/sys_menu/create',
    type: 'post',
    response: _ => {
      return {
        code: 20000,
        data: 'success'
      }
    }
  },

  {
    url: '/project/system/sys_menu/update',
    type: 'post',
    response: _ => {
      return {
        code: 20000,
        data: 'success'
      }
    }
  },

  {
    url: '/project/system/sys_menu/pMenulist',
    type: 'get',
    response: _ =>{
        return {
          code: 20000,
          data:{
            items:[{
              name: '顶级菜单',
              value: 0,
              },{
              name: '系统管理',
              value: 1,
              },
              {
                name: '用户管理',
                value: 2,
              }
            ]
          }
        }
    }
  },

  {
    url: '/project/system/sys_menu/delete',
    type: 'post',
    response: _ => {
      return {
        code: 20000,
        data: 'success'
      }
    }
  }
]

